package com.ezgo.erc.master.utils;

/**
 * 全局状态说明枚举类
 * 
 * @author devintam
 *
 * @Date 2015-07-08
 */
public enum GlobeStatus {
	API_OK("200", "OK", "请求成功"), API_CREATED("201", "CREATED", "创建成功"), API_ACCEPTED(
			"202", "ACCEPTED", "更新成功"), API_BADREQ("400", "BAD REQUEST",
			"请求的地址不存在或者包含不支持的参数"), API_UNAUTHORIZED("401", "UNAUTHORIZED",
			"未授权"), API_FORBIDDEN("403", "FORBIDDEN", "被禁止访问"), API_NOT_FOUND(
			"404", "NOT FOUND", "请求的资源不存在"), API_INTER_ERROR("500",
			"INTERNAL SERVER ERROR", "内部错误");

	public String statusCode;// 状态码
	public String enStatusMsg;// 英文说明
	public String zhStatusMsg;// 中文说明

	GlobeStatus(String statusCode, String enStatusMsg, String zhStatusMsg) {
		this.statusCode = statusCode;
		this.enStatusMsg = enStatusMsg;
		this.zhStatusMsg = zhStatusMsg;

	}

	/**
	 * 返回错误信息
	 * 
	 * @return
	 */
	public String getValue() {
		return super.toString() + "(" + statusCode + "," + enStatusMsg + ","
				+ zhStatusMsg + ")";
	}
}
